<?php

namespace app\api\controller;

use app\common\controller\Api;
use app\admin\model\Users;
use fast\Util;
use think\Db;

class Pub extends Api {

    protected $noNeedLogin = ['*'];
    protected $noNeedRight = ['*'];

    public function _initialize() {
        
    }

    public function index() {
        $this->success('1234');
    }

    public function getPic() {
        $img_list = \think\Db::table('fa_pic')
                ->order('img_id', 'asc')
                ->select();
        foreach ($img_list as &$val) {
            $val['img_url'] = $this->request->domain() . $val['img_url'];
        }

        unset($val);
        $this->success('获取成功',$img_list );
    }

}
